﻿using Summer.IO;
using System.Xml.Serialization;

#region License
/*
 *  Copyright (c) Dumuzi.cn 2009 , All rights reserved.
 *  CLR Version: 2.0.50727.4927
 *  NameSpace: Summer.Core.Config
 *  Author:Edwin Tai,戴佳顺
 *  Msn:edwin19861218@hotmail.com
 *  QQ: 1961218
 *  Date:2009/11/2 20:02:43
 *  Licensed under the Microsoft Public License (Ms-PL)
 *  This license governs use of the accompanying software. 
 *  If you use the software, you accept this license.
 *  If you do not accept the license, do not use the software.
 */
#endregion

namespace Summer.Core.Config
{

    public partial class SummerConfig : IParseableFile
    {
        [XmlElement(ElementName = "aop")]
        public Aop AopConfig
        {
            get;
            set;
        }

        public class Aop
        {
            [XmlElement(ElementName = "aspect")]
            public Aspect[] Aspects
            {
                set;
                get;
            }

            public class Aspect
            {
                [XmlAttribute(AttributeName = "value")]
                public string Value
                {
                    get;
                    set;
                }
                [XmlElement(ElementName = "advice")]
                public Advice[] Advices
                {
                    get;
                    set;
                }
            }

            public class Advice
            {
                [XmlAttribute(AttributeName = "type")]
                public string Type
                {
                    get;
                    set;
                }
                [XmlAttribute(AttributeName = "class")]
                public string Class
                {
                    get;
                    set;
                }
                [XmlElement(ElementName = "pointcut")]
                public Pointcut[] Pointcuts
                {
                    get;
                    set;
                }
            }

            public class Pointcut
            {
                [XmlText]
                public string Value
                {
                    get;
                    set;
                }
            }
        }

    }
}
